﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<AgriculturalMachinery.Models.HomeViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	我的页面
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="bgDiv" class="bgDiv"></div>
<div class="myContent">
    <a class="rcezrlex">日出而作，日落而息。</a>
    <div id="datepicker">
    </div>
    <div class="myContent middle">
        <a class="registerUser">已注册用户</a><br />
        <%int i = 0; %>
        <%foreach (AgriculturalMachinery.Models.Clients c in Model.QueryClient)%>
        <% { %>
        <%if (c.UserName.ToString().Trim().Equals("admin")) continue;%>
        <%i++; %>
        <div class="persional">
            <img alt="" src="../../Avatar/<%=c.Avatar %>" class="persionalAvatar" />
            <a class="persionalName" href="/personal/detail/<%=c.UserID %>">
                <%=c.UserName %></a><br />
            <a class="persionalLookinside" href="/personal/detail/<%=c.UserID %>">查看</a><br />
        </div>
        <%if (i == 5)
              break; %>
        <%} %>
        <div id="fenyeLeft" class="fenyeLeft" onmousemove="fenyeLeftMouseMove();" onmouseout="fenyeLeftMouseOut();"
            onclick="fenye();">
        </div>
        <div id="fenyeRight" class="fenyeRight" onmousemove="fengyeRightMouseMove();" onmouseout="fenyeRightMouseOut();"
            onclick="fenye();">
        </div>
    </div>
</div>
<div class="myPersonalInfo">
农友信息
<hr />
<%try %>
<%{ %>
    <%if (Request.Cookies["cooUserID"].Value != null) %>
    <%{ %>
        <a href="#" id="dialog_link">
        <img src="../../Avatar/<%=Model.CurrentClient.Avatar %>" alt="我的头像" class="personalAvatar"/>
        </a>
        <div id="dialog" title="上传头像" style="display: none;">
			<form action="/personal/UploadFile/<%=Request.Cookies["cooUserID"].Value %>" method="post" enctype="multipart/form-data">
			    <input type="file" name="uploadAvatar" />
			    <input type="submit" value="上传" />
			</form>
		</div>
        用户名: <input type="text" value="<%=Model.CurrentClient.UserName %>" />
        联系方式<input type="text" value="<%=Model.CurrentClient.Contact %>" />
        E-mail<input type="text" value="<%=Model.CurrentClient.Email %>" />
        密码<input type="password" value="<%=Model.CurrentClient.Password %>" />
        <input type="button" value="更新" />       
    <%} %>
<%} %>
<%catch %>
<%{ %>
登录超时, 情重新登录
<%} %>
</div>
<script type="text/javascript" src="../../Scripts/personalManager.js"></script>
</asp:Content>
